﻿@model JCTimes.Portal.Models.ConfigItem
<ul>
<li>
        @if (null == Model.Parent) {
            Model.HtmlDomName = "TreeView1_checkedNodes[" + Model.Index + "]";
        } else {
            Model.HtmlDomName = Model.Parent.HtmlDomName + ".Items[" + Model.Index + "]";
        }
        <span class="daredevel-tree-anchor">
        </span>
        <input  name='@(Model.HtmlDomName + ".Text")' type="hidden" value="@Model.Text" />
        <input  name='@(Model.HtmlDomName + ".Index")' type="hidden" value="@Model.Index" />
        <span>@Model.Text</span>
        <input  name='@(Model.HtmlDomName + ".Value")' type="hidden" value="@Model.Value" />
        @if (null != Model.Items) {
            for (var i = 0; i < Model.Items.Count; i++) {
            @Html.Partial("NodeItemTree", Model.Items[i])
            }
        }
    </li>
</ul>
